home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
DESKTOP
/
SINGULARITY
/
!Snglarity
/
!Help
< prev
next >
Wrap
Text File
|
1995-03-08
|
15KB
|
334 lines
SINGULARITY
=============
Or: What happens when a Black Hole gets smaller.
Singularity is the sequel to the hugely popular and remarkably well
programmed Black Hole II. It provides a very simple watsebin program which
requires only about 6K of memory. It is completely transparent in use and
provides a feature for 'ageing' of files in its bin so they don't clutter up
your hard disc for too long.
So, what does it do then?
=========================
When you delete a file (i.e. select 'Delete' from a Filer menu or type
*delete on the command line), Singularity takes a copy of the file and puts
it somewhere safe. It then lets the file be deleted, but now you have a
backup copy of the file in a known place. It's really easy, innit?
Advantages over 'conventional' wastebins
========================================
Most wastebin programs work on the drag-and-drop principle - you drag a file
to the wastebin and it takes a copy of the file then deletes it. The problem
with this is that you can still delete files from the filer or the command
line and lose them in the process. Singularity does not respond if you
drag a file onto it. It simply intercepts ALL file deletions completely
transparently and integrates much more neatly into your desktop. No more
multiple-sets-of-options to worry about. No more 'Oh bugger I wish I'd
dragged that file to the wastebin'. With Singularity running, you CANNOT
delete a file without getting a backup copy.
How to Get Going
================
Double-click on !Snglarity and a small window will open, hopefully in the
centre of the screen. This contains a logo, a Configure button, a Help!
button, and an OK button. Ignore the Configure button for now. The Help!
button will load this file. Click the OK button. The window will close and
the Singularity icon will appear on the left hand side of your iconbar.
The icon will initially be a sort of small ball with four dark green spiky
bits coming out of it. It will have the word 'On' underneath it. The small
ball with the dark green spiky bits is Singularity's way of telling you that
the Bin is empty. The word 'On' means Singularity is 'On' - i.e. it is
waiting with baited breath for you to delete a file. But hold on a minute.
First, click with Select (the left mouse button) on the Singularity icon. The
word underneath will change to 'Off'. This means Singularity is temporarily
inactive. Click again on the icon and the word will change back to 'On'.
Now find a file you don't want any more (or take a copy of one that you do)
and Delete it. You should see your hard disc whir for a bit, then the
Singularity icon will change to a larger ball with four light green spiky
bits. This means that there is something in the Bin. Click the Right mouse
button on the Singularity icon and the bin will be opened. It's a normal
Filer directory just like any other.
Easy so far. Click the middle mouse button over the Singularity icon and you
get a menu with three options. The top one is rather dull. The bottom one
(Quit) kills Singularity off. The middle one is 'Contents'. This has a
submenu with two options. The 'Destroy' option will empty the bin of all
its contents (i.e. delete them permanently). The 'Count' option will count
the contents and tell you how much disc space they take up.
The Bin
=======
Singularity stores its copies in a Bin. It's not actually a Bin, because that
would take up a lot of space and require regular visits from health and
safety inspectors. It's actually a directory on your hard disc.
Files that are copied into the Bin are placed in a subdirectory with a name
of the form "xxxx_yy_zz" where xxxx is the year, yy is the month, and zz is
the day. Thus we have a Root Bin and lots of sub-bins.
Note - the ADFS can only cope with 77 objects in one directory. Thus if
it gets to the stage where Singularity attempts to create the 78th directory
it will fail and will not copy the files.
I have not put a trap in to stop this because I hope that one day Acorn
might fix this problem.
Configuring Singularity
=======================
To Configure Singularity, run !Snglarity and Click on the 'Configure' button.
This opens the Configuration window. There are some options.
Ignore ADFS Floppy Discs : Makes Singularity ignore deletions from ADFS
floppy discs. This is usually a good thing, because you usually don't want
to keep backups of things on floppies. It also takes a long time.
Put Bin on Iconbar : Puts the Root Bin on the iconbar as a Tiny Dir. You
can then double click on it to open it.
Put Icon on Iconbar : Toggles whether Singularity appears on the iconbar.
Note that if you turn this off you won't be able to control Singularity
without using the command line, or access any of its menus.
Sprites : You can choose which sprites to use for the iconbar sprites. The
default is a sort of green spiky ball. There's a much nicer one of a dustbin
that was designed by Richard Hallas. Many thanks to him.
Delete Copies After : Things which have been in the bin longer than the
specified number of days will be deleted when Singularity is run. This means
Singularity acts as a safety buffer between you and your data and it
prevents your hard disc from filling up with stuff you thought you'd deleted
months ago.
Bin : Is the location of the Root Bin.
Filing Systems to Ignore : Singularity can be made to ignore deletions from
certain Filing Systems - e.g. the RAM disc. To do this, just type the name
of the filing system in this icon. The name of the filing system is what
appears in its directory viewers before the double colon. For example, bring
up the root directory of your hard disc. The title bar will probably start
with ADFS:: or IDEFS:: or SCSIFS::, or if you're wierd, CFS#. In these cases
the filing system names are ADFS, IDEFS, SCSIFS, and CFS. For the RAM disc
it's RAM. So to ignore all operations taking place on ADFS discs and the RAM
disc, just type ADFS,RAM into the writeable icon.
Note : Singularity cannot be made to Ignore certain types of filing system
which are known as image filing systems. Examples of Image filing systems
are SparkFS, ArcFS, and DOSFS.
When you've finished, click 'Save' to save the options to disc. Hit 'Cancel'
to destroy all your hard work. The 'Help!' button loads this file.
Running Singularity on startup
==============================
There is nothing whatsoever to stop you from running !Snglarity in your
desktop boot file by adding a line
Run <directory>.!Snglarity
This will, of course, run Singularity and open the announcement window. Most
people have complained about this. Therefore if you use the following:
Run <directory>.!Snglarity -nowindow
the announcement window will not appear. Note that the -nowindow switch is
CASE SENSITIVE. It must be all lower case. There is a very good reason for
this apparrent sloppiness, and that reason is absolute laziness.
And for all you clever dicks out there, do not attempt to start Singularity
by just RMLoading the module. You have been warned.
Wait! There's More!
===================
Singularity does something else! Cor! This is something that Black Hole II
also does, and that a lot of people find useful.
Let's suppose that you are in the process of saving a file from an
application to disc. You've typed the filename into the Save As box of the
application, and you've started to drag the file towards the directory
viewer. Suddenly, with a horrible sinking feeling, you realise that you
can't see the directory viewer! Aaaaaaagh! You've got to drop the file,
open the directory viewer, then go through all the hoo-hah of saving the
file again....
There are, however, two good things that are occurring:
1) You're not using Windows on a PC. That happens all the time if you're
lucky, so bear that in mind.
2) You are running Singularity! Don't fret any more! Don't drop that file!
Don't do drugs! (sorry, got carried away). Drag that file to the
Singularity icon and drop it there. Weyhey! Your file will be saved into
the ROOT bin directory. From there you can safely move it to wherever it
was you wanted to save it at your leisure.
Point to note: The file is saved in the ROOT bin directory. It WILL BE
DELETED the next time you run !Snglarity. OK?
To remind you to move the file, Singularity opens the Root Bin directory
once the file has been saved.
Point to note, the sequel: This is a cut down version of what Black Hole II
allows you to do. With Black Hole, you can make it save files to different
directories depending on their file types.
Some technical stuff (but not too technical)
============================================
Singularity is a module, which is how it manages to be small. Singularity is
based on the Black Hole module that is distributed with Black Hole II. You
cannot run Black Hole and Singularity at the same time, but since Black Hole
provides all the features of Singularity and more, you'd have to be pretty
bleedin' stupid to do that anyway.
Note also that because of the way it works, all directory structure will be
lost when files are copied into the bin. If this is a problem and memory
usage isn't, use Black Hole II.
It will ignore all disc operations which take place in Wimp$ScrapDir.
If I didn't do this, all the temporay files placed in Wimp$ScrapDir by
applications would be copied to the bin before being deleted. This is not
particulary useful and I have seen applications crash because of this.
To this end, you should make sure that if you own any applications which
allow you to define a scrap directory just for them, you should define it
somewhere in Wimp$ScrapDir.
Note for the less competent: Wimp$ScrapDir is a directory used by all
applications which want it as a place to store temporary files. Applications
write a file into this directory, then delete it when they have finished.
File compression programs such as Spark and CFS use Scrap directories.
Wimp$ScrapDir is usually the directory !Scrap.ScrapDir. You can find out by
pressing F12 and typing 'Show Wimp$ScrapDir'. Wherever it is, Singularity
will find it and will ignore anything that happens inside it.
Memory Usage (slightly technical stuff)
=======================================
Some people worry about this sort of thing. I don't but then I'm just like
that. For the fanatical, here's a breakdown of Singularity's memory usage.
Module itself - 4412 bytes
Permanent workspace - 1280 butes
Info window - 248 bytes
---------------------------------
TOTAL 5940 bytes (6K)
You can't argue with that now, can you?
The Announcement/Configuration program requires a temporary 32K wimpslot.
DO NOT attempt to run the Singularity module without going via the
Configuration program. You have been warned.
The Singularity module (very technical stuff)
=============================================
There are, I'm sure, a few people who still occasionally use the command line
or other odd things. Well. Singularity, just because of the way it works,
will also trap deletions made from the command line. There is a command line
interface for controlling Singularity:
*BinOn, *BinOff - The functions of which should be obvious.
*BinStatus - Which tells you whether the Bin is currently on or off.
*BinIgnore - Takes one parameter, which is the name of a Filing
System to ignore. NOTE : If you do use this, you MUST
make certain that the total length of all the filing
system names added to Singularity is less than 128
bytes. The !Snglarity program does this so the module
DOES NOT check.
*BinIgnoreClear - Clears the list of filing systems to ignore.
*BinCatchADFSFloppies and *BinIgnoreADFSFloppies should be obvious.
One interesting side effect of running Singularity is that you can quickly
find out which applications use a temp file that isn't inside Wimp$ScrapDir,
because Singularity copies it over as soon as the application tries to
delete it.
Ignored Device Filing Systems (Horendously Technical Stuff)
===========================================================
RISC OS 3 implements a lot of devices as pseudo-filing systems. One example
is the parallel port. Singularity will ignore all the device filing systems
that I currently know about.
The code to do this is quick and therefore should not measurably slow down
the response of these systems.
For insterested parties, the filing systems (and their numbers) that are
ignored are:
NetPrint (12)
Null (13)
Printer (14)
Serial (15)
Vdu (17)
RawVdu (18)
Kbd (19)
RawKbd (20)
DeskFS (21)
Computer Concepts RomFS (22)
Streamer (25)
Digitiser (27)
Scanner (28)
PipeFS (47)
DeviceFS (53)
Parallel (54)
Disclaimer:
===========
This program is supplied 'as is' with no guarantee of its suitability for any
purpose. I will not be held responsible for any loss of data occuring through
the use or misuse of this program.
If anything goes wrong with Singularity then I DO NOT want to hear about it.
Well, maybe if you tell me gently and accompany your communication with
something to lessen the blow, such as a vast sum of money.
Public Domain Notice:
=====================
Singularity is released by courtesy of the Fat German in association with the
Great Green Gollywog and his minions. The King of the Potato People would
like to point out that he is not responsible for this, or for anything else
for that matter.
This software may be freely copied and used, as long as the following
conditions are met:
a) That this notice is distributed unchanged with every copy.
b) That no modifications are made to any part of the code or other files.
c) No charge is made for the distribution. Public domain libraries may make
a small charge to cover distribution costs. It is highly unethical, not
to mention dishonest to make a charge for software which programmers
have intended to be freely distributed, especially if none of that profit
finds its way to the programmer.
d) You do at least one thing to promote peace and harmony between all the
peoples of the world. Including potatoes. And gollywogs.
All copyright is reserved. Anybody who uses my code in a project which is
intended to be sold for profit is a foul scumbag. Unless they give me some
money too, then it's allright.
If you wish to use pieces of my code in your own pd programs then please feel
free to do so, provided these programs are not intented for sale. If you do
use my code, a credit would be nice. Money would be even better.
I can be contacted via the remarkable British postal service at:
Mark Greenwood,
122 Miswell Lane,
Tring,
Herts. HP23 4EU
England
Or via the slightly quicker but infinitiely less reliable wonders of
telecommunications science at
1) mgreenwo@madge1.demon.co.uk
which is reliable but UNIX based (Aaaaaaaaaagh!), therefore
2) mgreenwo@madge.com
is preferable if slightly slower.
Thanks to Dave for inventing Fat German.